home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util1
/
xpkatn10.lha
/
XPKatana
/
Arexx
/
Unpack_kat.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-12-26
|
2KB
|
78 lines
/*************************************************************************
Unpack_kat.rexx 0.1 (26.12.95) by Eric Sauvageau
Script for XPkatana - Will unpack the specified file. If "?" is used as
the source file, then a file requester will open, asking for the source.
Usage: Unpack_kat.rexx <filename>
**************************************************************************/
/*** We want answers!!! :) ***/
Options results
/*****
We need to get the shell's path, so XPKatana will be able to
locate the desired source file.
*****/
path = Pragma('D','')
Call extend_path
/*** I wanna talk to ya :) ***/
Address 'KATANA'
/*** Retrieve the filename from the command line ***/
Parse Arg source
If source = "" Then Do
Say "You must specify a source filename!"
Exit 10
End
/*** Store the No Progress flag state. ***/
GETFLAG NOPROGRESS ; oldprogress = result
/*** Tell XPKatana to not open any progress window. ***/
SETFLAGS NOPROGRESS 1
/*** Tell XPKatana what is the source file. ***/
SETSOURCE source ; found = result
/*****
If XPKatana can't find it, then try again, but adding the
current process's full path.
*****/
IF (found = 'NOFILE') & (source ~= '?') Then SETSOURCE path||source
/***
Unpack the file, keeping the same filename (unless
"Handle Suffix" was previously enabled.
***/
Say "Unpacking..."
UNPACK ; error = result
If error = "ABORT" Then Do
Say "Unpacking aborted or failed!"
End
Else Do
Say "Done."
End
/*** Restore the no progress initial state and Exit ***/
SETFLAGS NOPROGRESS oldprogress
Exit
extend_path:
If Right(path,1) ~= ':' Then path = path||'/'
Return